package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import com.sdicons.json.validator.impl.predicates.True;

import cn.com.api.entity.ApiU_see_his;

//DAO
public interface U_see_hisMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_SEE_HIS  WHERE ID = #{id}")
	public ApiU_see_his findU_see_hisById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_see_his")
	public List<ApiU_see_his> findU_see_hiss();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_see_hissByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_SEE_HIS (USER_ID, SEE_UID, IS_READ, SEE_TIME, EXT1, EXT2, EXT3) VALUES (#{user_id}, #{see_uid}, #{is_read}, #{see_time}, #{ext1}, #{ext2}, #{ext3})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_see_his(ApiU_see_his u_see_his);

	// 修改
	@Update("UPDATE U_SEE_HIS SET USER_ID = #{user_id}, SEE_UID = #{see_uid}, IS_READ = #{is_read}, SEE_TIME = #{see_time}, EXT1 = #{ext1}, EXT2 = #{ext2}, EXT3 = #{ext3} WHERE ID = #{id}")
	public int updateU_see_his(ApiU_see_his u_see_his);

	// 删除
	@Delete("DELETE FROM U_SEE_HIS  WHERE ID = #{id}")
	public int deleteU_see_his(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
